package com.atguigu.gulimall.product.feign;

import com.atguigu.common.to.SkuReductionTo;
import com.atguigu.common.to.SpuBoundTo;
import com.atguigu.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author ming
 * @create 2022/4/25
 * @description:
 */
@FeignClient("gulimall-coupon")
public interface CouponFeignService {
    /**
     * 1.@RequestBody将对象转为json对象
     * 2.发送/coupon/spounds/save 将上一步转为json放在请求体
     * 3.对方服务收到请求体里的json数据
     * 4.将json对象封装成对象
     * @param spuBoundTo
     */
    @PostMapping("coupon/spubounds/save")
    R saveSpuBounds(@RequestBody SpuBoundTo spuBoundTo);
    @PostMapping("coupon/skufullreduction/saveInfo")
    R saveSkuReduction(@RequestBody SkuReductionTo skuReductionTo);
}
